﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class Subscription
    {
        private IDataRepository _dataObject;

        public Subscription(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateSubscription(this);
        }
        public void GetSubscriptionByEmail()
        {
            _dataObject.GetSubscriptionByEmail(this);
        }
        public List<Subscription> GetAllSubscriptions()
        {
            return _dataObject.GetAllSubscriptions();
        }
    }
}
